package com.dongrj.framework.excel.converter;

import com.google.common.collect.Maps;

import java.util.Map;

public final class IntConverter {

    public static class WeightConverter extends AbstractIntConverter {
        @Override
        public Map<Integer, String> sourceMap() {
            Map<Integer, String> sourceMap = Maps.newHashMapWithExpectedSize(2);
            sourceMap.put(0, "定量");
            sourceMap.put(1, "散称");
            return sourceMap;
        }
    }

    public static class ShelfConverter extends AbstractIntConverter {
        @Override
        public Map<Integer, String> sourceMap() {
            Map<Integer, String> sourceMap = Maps.newHashMapWithExpectedSize(2);
            sourceMap.put(0, "下架");
            sourceMap.put(1, "上架");
            return sourceMap;
        }
    }

    public static class YeOrNoConverter extends AbstractIntConverter {
        @Override
        public Map<Integer, String> sourceMap() {
            Map<Integer, String> sourceMap = Maps.newHashMapWithExpectedSize(2);
            sourceMap.put(0, "否");
            sourceMap.put(1, "是");
            return sourceMap;
        }
    }

    public static class ApproveConverter extends AbstractIntConverter {
        @Override
        public Map<Integer, String> sourceMap() {
            Map<Integer, String> sourceMap = Maps.newHashMapWithExpectedSize(2);
            sourceMap.put(0, "审核中");
            sourceMap.put(1, "审核通过");
            sourceMap.put(2, "审核拒绝");
            return sourceMap;
        }
    }
}
